home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wonky Flux Batch 2019 02
/
Wonky_Flux_Batch_2019-02.zip
/
Wonky Flux Batch 2019-02
/
075 - Clash of Arms.dsk
/
WAR.SYSOP.SEG.S
< prev
Wrap
Text File
|
2019-02-17
|
7KB
|
202 lines
; *****************
; ** **
; * Clash of Arms *
; * Sysop Seg *
; ** **
; *****************
public BeginGame
on nocar goto HungUp
goto SysopMenu
HungUp
link "a:war.start","termgame"
BeginGame
; from war.start.s
gosub StartGame
gp=gn:gn=0
link "a:war.start","MainCommand"
SysopMenu
input \"Sysop Command (?=Help): ";ka$
if ka$="?" print '
------------------------
Sysop`s Menu
------------------------
C: Create Game File
F: Create/Reset Files
S: Start a Game
D: Delete a Game
A: Add Item to News
Q: Quit
------------------------'
if ka$="A" print \"Add news item:"\date$;:input @3 ": ";km$
if (ka$="A") and (len(km$)<1) print \"Aborted":goto SysopMenu
if ka$="A" open #1,dr$+"war.news":append #1:print #1,date$;": ";km$:close
if ka$="C" goto CreateFile
if ka$="S" gosub GetGame:gosub StartGame:goto SysopMenu
if ka$="D" gosub GetGame:gosub DeleteGame
if ka$="F" goto CrtDlt
if ka$="Q" link "a:war.start","MainCommand"
goto SysopMenu
CreateFile
input \"Game Number (?=List): ";gn$:gn=val(gn$)
if gn$ = "?" gosub ListGames:goto CreateFile
if (gn=0) and (gn$<>"0") print \"Try again...":goto CreateFile
if gn=0 goto SysopMenu
kill dr$+"GAME.DATA."+gn$:create dr$+"GAME.DATA."+gn$
open #1,dr$+"GAME.DATA."+gn$
for ka = 1 to 6
GetUsrNumber
print \"User number of Player #";ka;": ";
input kb
open #2,"b:users":position #2,128,kb:input #2,ka$,ka$:input #2,kn$:close #2
if len(kn$)<1 goto GetUsrNumber
position #1,1,(ka-1)*25:print #1 kn$
print kn$"? (Y/[N]) ";:input @2 ka$
if ka$<>"Y" goto GetUsrNumber
open #2,dr$+"war.master"
position #2,35,(gn-1),(ka-1)*5:print #2,kb
if ka=6 position #2,35,(gn-1),30:print #2,0
; set game to "not currently playing" on the last time thru loop
close #2
next
print "Creating files.";
for ka = 150 to 200 step 10
position #1,1,ka:print #1,date$
next
for ka = 210 to 295 step 5
position #1,1,ka:print #1,0
next
position #1,1,300:print #1,12
position #1,1,305:print #1,12
for ka= 310 to 325 step 5
position #1,1,ka:print #1,4
next
close
print "." ;
NewGameFiles
kill dr$+"attacks."+gn$:create dr$+"attacks."+gn$:open #1,dr$+"attacks."+gn$
for p1=0 to 5
for p2=0 to 5
position #1,60,p1,10*p2:print #1,0
position #1,60,p1,(10*p2)+5:print #1,0
next
next
close
kill dr$+"war.map1."+gn$:create dr$+"war.map1."+gn$
open #1,dr$+"war.map1":open #2,dr$+"war.map1."+gn$:copy #1,#2:close
print "." ;
kill dr$+"war.map2."+gn$:create dr$+"war.map2."+gn$
open #1,dr$+"war.map2":open #2,dr$+"war.map2."+gn$:copy #1,#2:close
print "."
return
goto SysopMenu
CrtDlt
input @2 \"M)aster file, N)ews file, H)all of Fame, T)op Score: ";ka$
if ka$="M" kill dr$+"war.master":create dr$+"war.master":print \"Created"
if ka$="N" kill dr$+"war.news":create dr$+"war.news":print \"Created"
if ka$="H" kill dr$+"war.fame":create dr$+"war.fame":print \"Created"
if ka$="T" kill dr$+"top.score":create dr$+"top.score":close:open #1,dr$+"top.score":print #1,"No Conquerors":print #1,0:print \"Created":close
goto SysopMenu
GetGame
input \"Game Number (?=List): ";GN$
if gn$="?" gosub ListGames:goto GetGame
gn=val(gn$)
if gn=0 gn$="0":print "- Aborted -":return
open #1,dr$+"war.master":position #1,35,(gn-1):input #1 ka$:close
if val(ka$)=0 and (ka$<>"0") print \"That game is not being played right now.":goto GetGame
return
DeleteGame
open #1,dr$+"war.master"
position #1,35,(gn-1),30:print #1,0
position #1,35,(gn-1),0:print #1,"D"
close
for pn=1 to 6:gosub RemovePlayer:next
return
RemovePlayer
open #1,dr$+"war.master"
position #1,35,gn-1,(pn-1)*5:print #1,0
close
return
StartGame
open #1,dr$+"WAR.MASTER"
for ka = 1 to 6
position #1,35,(gn-1),(ka-1)*5:input #1,kb
if kb=0 goto PastMail
MailUsers
d=kb
edit(0)
print #8,"Clash of Arms Notification:"
print #8,""
print #8,"As of "date$" "time$" enough players have entered the game."
print #8,"You may begin play, in game #"gn"!"
print #8,""
ready "g:mail"
if info(6)<29 print \"Mail bit-map full":return
print #msg(d),un
print #6,"Subj: Clash of Arms"
print #6,"From: War Command Headquarters"
copy #8,#6:print #msg(d),chr$(4);chr$(0);
msg(d)=msg(d)+1:update
PastMail
next
position #1,35,(gn-1),30:print #1,1
close
open #1,dr$+"game.data."+str$(gn)
for ka = 0 to 5
position #1,1,150+(ka*10)
print #1,left$(date$,3);
print #1,right$("0"+ str$(val(mid$(date$,4,2))-1),2);right$(date$,3)
next
close:return
ListGames
print '
# # of players In Progress
---- ------------ -----------'
open #1,dr$+"war.master"
ka=1
ListLoop
kc=0
for kb = 1 to 6
position #1,35,ka-1,(kb-1)*5:input #1,ka$
if (val(ka$)=0) and (ka$<>"0") and (ka$<>"D") ka=0
if ka$="D" kc=7
if val(ka$) > 0 kc=kc+1
next
if kc>6 kc=0
if ka=0 close:return
if kc print left$(str$(ka)+" ",5);kc;" ";
position #1,35,(ka-1),30:input #1,kd
if kc=0 ka=ka+1:goto ListLoop
if kd=0 print "No":else print "Yes"
ka=ka+1:goto ListLoop